package oop5.sonar;

public class Oscar implements Swimming {
    private String type;    //潜艇类型

    public Oscar(String type) {
        this.type = type;
    }

    @Override
    public void swim() {
        System.out.println("一艘"+type+"在深海中游动");
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
